package ui
{
	import com.adobe.serialization.json.JSON;
	
	import org.egame.net.JSONPackage;

	/**
	 * List列表项
	 */ 
	public class ListItem
	{
		private	var _name:String = null;
		private	var _url:String = null;
		private	var _artist:String = null;
		
		public function ListItem()
		{
		}
		
		public	function	get name():String{
			return this._name;
		}
		
		public	function	set name(name:String):void{
			this._name = name;
		}
		
		public	function	get url():String{
			return this._url;
		}
		
		public	function	set url(url:String):void{
			this._url = url;
		}
		
		public	function	get artist():String{
			return this._artist;
		}
		
		public	function	set artist(artist:String):void{
			this._artist = artist;
		}
		
		public	function	toString():String{
			var pack:JSONPackage = new JSONPackage(0);
			pack.putString("name", this._name);
			pack.putString("artist", this._artist);
			pack.putString("url", this._url);
			return pack.toString();
		}
		
		public	function	fromString(str:String):void{
			var obj:Object = JSON.decode(str);
			var pack:JSONPackage = new JSONPackage(0);
			pack.setInnerObj(obj);
			this._name = pack.getString("name");
			this._artist = pack.getString("artist");
			this._url = pack.getString("url");
		}
	}
}